load("//bazel:tachyon.bzl", "if_node_binding")
load("//bazel:tachyon_cc.bzl", "tachyon_cc_library")

tachyon_cc_library(
    name = "node_base",
    srcs = if_node_binding([
        "node_constructors.cc",
        "node_constructors.h",
        "node_cpp_bindable.cc",
        "node_cpp_bindable.h",
        "node_cpp_callable.h",
        "node_cpp_callable_data.h",
        "node_cpp_constructor.cc",
        "node_cpp_constructor.h",
        "node_cpp_constructor_matcher.h",
        "node_cpp_object.h",
        "node_errors.cc",
        "node_internals.h",
        "node_internals_forwards.h",
        "node_module.cc",
    ]),
    hdrs = [
        "node_cpp_class.h",
        "node_cpp_enum.h",
        "node_errors.h",
        "node_module.h",
    ],
    visibility = ["//visibility:public"],
    deps = [
        "//tachyon/base:logging",
        "//tachyon/base:template_util",
        "//tachyon/base/binding:binding_util",
        "//tachyon/base/functional:functor_traits",
        "//tachyon/base/numerics:safe_conversions",
        "@com_google_absl//absl/container:flat_hash_map",
        "@com_google_absl//absl/container:inlined_vector",
        "@com_google_absl//absl/strings",
    ] + if_node_binding([
        "@node_addon_api",
    ]),
)
